from building import *

# get current directory
cwd = GetCurrentDir()

Libraries_src = Glob('queue/*.c')
Libraries_src += Glob('experimental_section_vars/*.c')
Libraries_src += Glob('atomic/*.c')
Libraries_src += Glob('atomic_flags/*.c')
Libraries_src += Glob('timer/app_timer_rtthread.c')
Libraries_src += Glob('util/*.c')

SrcRemove(Libraries_src, 'util/app_error_handler_iar.c')
SrcRemove(Libraries_src, 'util/app_error_handler_gcc.c')

lib_path = [cwd + '/util']
lib_path += [cwd + '/timer']
lib_path += [cwd + '/experimental_section_vars']
lib_path += [cwd + '/atomic']
lib_path += [cwd + '/atomic_flags']
lib_path += [cwd + '/log']
lib_path += [cwd + '/log/src']
lib_path += [cwd + '/strerror']

lib_group = DefineGroup('nRF_Libraries', Libraries_src, depend = [''], CPPPATH = lib_path)
Return('lib_group')
